var express = require('express');
var conn = require('../public/javascripts/connect');
var router = express.Router();
//一键锁定功能
router.post("/", async function (req, res, next) {
    let {state, tableName} = req.body;
    let sql = `UPDATE correspondence_table SET state=${state} WHERE table_name=${tableName}`;
    conn.connection2.query(sql, function (err, result, filed) {
        if (err) {
            return '[UPDATE ERROR]::' + err;
        }
        console.log("result", result)
        res.json({saveSuc: true})
    })
})
module.exports = router;